<template>
  <div>
    <el-table :data="tableData" height="500" border>
      <el-table-column width="30"> </el-table-column>
      <el-table-column prop="id" label="编号" height="20"> </el-table-column>
      <el-table-column prop="name" label="姓名" height="20"> </el-table-column>
      <el-table-column prop="gender" label="性别" height="20">
      </el-table-column>
      <el-table-column prop="phone" label="电话" height="20"> </el-table-column>
      <el-table-column prop="dormId" label="宿舍楼" height="20">
      </el-table-column>
      <el-table-column prop="roomId" label="寝室号" height="20">
      </el-table-column>
      <el-table-column label="操作" width="200">
        <el-button>编辑</el-button><el-button type="danger">删除</el-button>
      </el-table-column>
    </el-table>
  </div>
</template>

<script src="../../public/js/mock.js"></script>
<script>
const Mock = require('mockjs');
let studata = Mock.mock({
  'stusAdmins|100': [
    {
      'id|+1': 1,
      sid: /^2021[3456789]\d{4}$/,
      name: '@cname',
      gender: '@cword("男女", 1)',
      phone: /^1[3456789]\d{9}$/,
      address: '第@cword("一二三四五", 1)宿舍楼',
      username: /^[1-9]{3}$/
    }
  ]
});
export default {
  name: 'StuManager',
  data() {
    return {
      tableData: studata.stusAdmins
    };
  }
};
</script>

<style scoped></style>
